import Vue from 'vue'
import VueRouter from 'vue-router'
//用户界面
import Home from '../views/Home.vue'
import carbarn from "../views/carbarn.vue"
import caraddress from "../views/caraddress.vue"
import carport from "../views/carport.vue"
import subscribe from "../views/subscribe.vue"

import Login from "../views/login.vue"
import UserApp from "../views/UserApp.vue"
import Order from "../views/Order.vue"
import cardetail from "../views/cardetail.vue"
import choose from "../views/choose.vue" //用户注册后的选择页面

import UserManager from "../views/usermanager.vue"
import boss from "../views/boss.vue"
import Register from "../views/Register.vue"
import pay from "../views/pay.vue"
import YesPay from "../views/YesPay.vue"
import ToAddress from "../views/ToAddress.vue"
import MyParking from "../views/MyParking.vue"
import UserIndex from "../views/UserIndex.vue"
//个人中心页面
import ChangePassword from "../views/UserChangePassword.vue" //修改密码
import SystemMassage from "../views/SystemMassage.vue" //系统消息
import UserMassage from "../views/UserMassage.vue" //用户消息
import websocked from "../views/Websocked.vue"
//结算页面
import PayRetrun from '../views/PayRetrun.vue'

//安全设置
import InputTel from "../views/InputTel.vue" //手机验证
import UserUpdatePassword from "../views/UserUpdatePassword.vue" //修改密码
import AfterOkPassword from "../views/AfterOkPassword.vue" //修改成功后的密码


import UserAuth from "../views/UserAuth.vue" //用户实名认证
import UserInfo from "../views/UserInfo.vue" //用户详情
import UserBalance from "../views/UserBalance.vue" //用户钱包
import UserCredit from "../views/UserCredit.vue" //用户信用
import userearnings from "../views/userearnings.vue" //收益
import usercarport from "../views/usercarport.vue" //查看车位
import UserExpent from "../views/UserExpent.vue" //用户支出
import usercommitcarport from '../views/usercommitcarport.vue' //上架车位
import userrenter from "../views/userrenter.vue" //成为租客
import usercar from "../views/usercar.vue" //我的车辆


// 管理员界面
import AdminLogin from "../views/AdminLogin.vue"
import Boss from "../views/BossApp.vue"
import earnings from "../views/earnings.vue"
import bosscarku from "../views/bosscarku.vue"
import bossaduit from "../views/bossaduit.vue"
import Parking from "../views/parking.vue"
import UpdUser from "../views/UpdUser.vue"
import Property from "../views/Property.vue";
import carseckill from "../views/carseckill.vue"
import UserRiverShow from "../views/UserRiverShow.vue"
import UserRiverReview from "../views/UserRiverReview.vue";
import UserRentShow from "../views/UserRentShow.vue";
import UserRentReview from "../views/UserRentReview"
import parkingReview from "../views/parkingReview.vue"
import OrderInfo from "../views/OrderInfo.vue";
import ParkingInfo from "../views/ParkingInfo.vue";
import Platfrom from "../views/Platfrom.vue";

//物业管理
import PropertyApp from "../views/PropertyApp.vue"
import PayItems from "../views/PayItems.vue"
import PropertyCart from "../views/Property-Cart.vue"
import Compint from "../views/Compint.vue"
import Maintain from "../views/Maintain.vue"
import PropertyChangePassword from "../views/PropertyChangePassword.vue"
import PropertyMoney  from "../views/PropertyMoney.vue"
import PropertyMsg  from "../views/PropertyMsg.vue"

Vue.use(VueRouter)

const routes = [{
        path: '/',
        name: 'userapp',
        component: UserApp,
        children: [{
                path: '/payretrun',
                name: "PayRetrun",
                component: PayRetrun
            }, {
                path: '/userapp/boss',
                name: "boos",
                component: boss
            },
            {
                path: '/',
                name: "Home",
                component: Home
            },
            {
                path: "/userapp/toAddress",
                name: "toAddress",
                component: ToAddress
            },
            {
                path: '/userapp/subscribe',
                name: 'subscribe',
                component: subscribe
            },
            {
                path: "/userapp/yesPay",
                name: 'yesPay',
                component: YesPay
            },

            {
                path: '/userapp/login',
                name: 'login',
                component: Login
            },
            {
                path: "/userapp/register",
                name: "register",
                component: Register
            },
            {
                path: "/userapp/choose",
                name: "choose",
                component: choose
            },
            {
                path: '/userapp/carbarn',
                name: 'carbarn',
                component: carbarn
            },
            //个人中心
            {
                path: "/userIndex",
                name: "userIndex",
                component: UserIndex,
                children: [{
                        path: "/changePassword",
                        name: "changePassword",
                        component: ChangePassword,
                        children: [{
                                path: "/",
                                name: "inputTel",
                                component: InputTel
                            },
                            {
                                path: "userUpdatePassword",
                                name: "userUpdatePassword",
                                component: UserUpdatePassword
                            },
                            {
                                path: "afterOkPassword",
                                name: "afterOkPassword",
                                component: AfterOkPassword
                            },

                        ]
                    },
                    {
                        path: "/",
                        name: "userAuth",
                        component: UserAuth
                    },
                    {
                        path: "/userInfo",
                        name: "userInfo",
                        component: UserInfo
                    },
                    {
                        path: "/userbalance",
                        name: "userbalance",
                        component: UserBalance,
                    },
                    {
                        path: "/userExpent",
                        name: "userExpent",
                        component: UserExpent
                    },
                    {
                        path: "/userCredit",
                        name: "userCredit",
                        component: UserCredit
                    },
                    {
                        path: "/userearnings",
                        name: "userearnings",
                        component: userearnings
                    },
                    {
                        path: "/usercarport",
                        name: "usercarport",
                        component: usercarport
                    }, {
                        path: '/usercar',
                        name: 'usercar',
                        component: usercar
                    }, {
                        path: '/order',
                        name: 'order',
                        component: Order
                    }, {
                        path: '/SystemMassage',
                        name: 'SystemMassage',
                        component: SystemMassage
                    }, {
                        path: '/websocked',
                        name: 'websocked',
                        component: websocked
                    }, {
                        path: "/userapp/myParking",
                        name: "myParking",
                        component: MyParking
                    }, {
                        path: "/userapp/userrenter",
                        name: "userrenter",
                        component: userrenter
                    }
                ]
            },
            {
                path: '/userapp/caraddress',
                name: 'caraddress',
                component: caraddress
            },
            {
                path: '/userapp/carport',
                name: 'carport',
                component: carport
            },

            {
                path: "/userapp/cardetail",
                name: "cardetail",
                component: cardetail
            },
            {
                path: "/userapp/carseckill",
                name: "carseckill",
                component: carseckill
            },
            {
                path: "/upduser",
                name: "UpdUser",
                component: UpdUser
            },
            {
                path: "/userapp/pay",
                name: "pay",
                component: pay
            },
            {
                path: "/usercommitcarport",
                name: "usercommitcarport",
                component: usercommitcarport
            },
            
        ]
    },
    //管理员界面
    {
        path: '/userapp/adminlogin',
        name: "AdminLogin",
        component: AdminLogin,
    },
    {
        path: '/bossapp',
        name: "boss",
        component: Boss,
        children: [{
            path: '/usermanerge',
            name: 'usermanerge',
            component: UserManager
        }, {
            path: '/UserRiverShow',
            name: 'UserRiverShow',
            component: UserRiverShow
        },{
            path: '/platform',
            name: 'Platform',
            component: Platfrom
        },{
            path: '/parkingInfo',
            name: 'ParkingInfo',
            component: ParkingInfo
        },{
            path: '/orderInfo',
            name: 'OrderInfo',
            component: OrderInfo
        }, {
            path: '/UserRentShow',
            name: 'UserRentShow',
            component: UserRentShow
        }, {
            path: '/UserRentReview',
            name: 'UserRentReview',
            component: UserRentReview
        }, {
            path: '/UserRiverReview',
            name: 'UserRiverReview',
            component: UserRiverReview
        }, {
            path: '/property',
            name: 'Property',
            component: Property
        }, {
            path: '/parking',
            name: 'parking',
            component: Parking
        }, {
            path: '/parkingReview',
            name: 'parkingReview',
            component: parkingReview
        }, {
            path: '/earnings',
            name: 'earnings',
            component: earnings
        }, {
            path: '/bosscarku',
            name: 'bosscarku',
            component: bosscarku
        }, {
            path: '/bossaduit',
            name: 'bossaduit',
            component: bossaduit
        }]

    },
    //物业管理
    {
        path: "/propertyApp",
        name: "propertyApp",
        component: PropertyApp,
        children: [{
                path: "/payItems",
                name: "payItems",
                component: PayItems
            },
            {
                path: "/propertyCart",
                name: "propertyCart",
                component: PropertyCart
            },
            {
                path: "/compint",
                name: "compint",
                component: Compint
            },
            {
                path: "/maintain",
                name: "maintain",
                component: Maintain
            }, 
            {
                path: "/propertyApp/payItems",
                name: "payItems",
                component: PayItems
            },
            {
                path:"/propertyChangePassword",
                name:"propertyChangePassword",
                component:PropertyChangePassword
            },
            {
                path:"/propertyMoney",
                name:"propertyMoney",
                component:PropertyMoney
            },
            {
                path:"/propertyMsg",
                name:"SystemMassage",
                component:SystemMassage
            },
            {
                path:"/proMassage",
                name:"UserMassage",
                component:UserMassage
            }
        ]
    },

    {
        path: '/about',
        name: 'About',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
            import ( /* webpackChunkName: "about" */ '../views/About.vue')
    }
]

const router = new VueRouter({
    routes
})

export default router